package org.ftc.service;

import java.util.List;

import org.ftc.dao.CodeCauseDao;
import org.ftc.domain.CodeCause;
import org.ftc.form.CodeCauseForm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CodeCauseService {
	
	@Autowired
	CodeCauseDao codeCauseDao;
	@Autowired
	private UsersService usersService;
	
	public CodeCause load(String id) {
		return codeCauseDao.load(id);
	}

	public CodeCause get(String id) {
		return codeCauseDao.get(id);
	}
	
	public synchronized boolean save(CodeCause entity) {
		return codeCauseDao.save(entity);
	}


	public synchronized boolean saveOrUpdate(CodeCause entity) {
		return codeCauseDao.saveOrUpdate(entity);
	}

	public synchronized boolean update(CodeCause entity) {
		return codeCauseDao.update(entity);
	}

	public synchronized boolean delete(CodeCause entity) {
		return codeCauseDao.delete(entity);
	}

	public synchronized boolean delete(String id) {
		return codeCauseDao.delete(id);
	}
	
	public List<CodeCause> findPage(CodeCauseForm form) {
		return codeCauseDao.findPage(form);
	}

	public List<CodeCause> findAll() {
		return codeCauseDao.findAll();
	}

	public long countAll() {
		return codeCauseDao.countAll();
	}
	
	
	
}
